package com.baomidou.blog.controller;

import com.baomidou.blog.entity.Article;
import com.baomidou.blog.service.IArticleService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
public class IndexController {


	@RequestMapping("/admin")
	public String index(ModelMap map) {
		map.addAttribute("host", "http://blog.baomidou.com");
		return "admin/admin";
	}

	@RequestMapping("/blog")
	public String blog(ModelMap map) {

		map.addAttribute("menu", "content");
		return "blog/blog";
	}

	@RequestMapping("/archives")
	public String archive(ModelMap map) {

		map.addAttribute("menu", "archives");
		return "blog/blog";
	}



}
